home *** CD-ROM | disk | FTP | other *** search
/ Aminet 44 / Aminet 44 (2001)(GTI - Schatztruhe)[!][Aug 2001].iso / Aminet / game / patch / WHDIGamesJ-M.lzh / LastDuel.lha / LastDuelHD / Install-Game < prev    next >
Text File  |  1999-04-18  |  2KB  |  111 lines

  1. (set #CI_unit 0)
  2. (set #CI_drive ("DF%ld:" #CI_unit))
  3. (set #readme "lastdl")            ; %shd.readme
  4.  
  5. ;----------------------------
  6.  
  7. ;try to figure out a place where the user usually installs his games
  8. (if (exists "Games:" (noreq) )
  9.     (set @default-dest "Games:")
  10.     (if (exists "SYS:Games" (noreq) )
  11.         (set @default-dest "SYS:Games")
  12.         (if (exists "Work:Games" (noreq) )
  13.             (set @default-dest "Work:Games")
  14.             (if (exists "JEUX:" (noreq) )
  15.                (set @default-dest "JEUX:")
  16.                (set @default-dest "SYS:")
  17.             )
  18.         )
  19.     )
  20. )
  21.  
  22.  
  23. (message "\n\n\nThis loader requires either JST or WHDLoad (NOT INCLUDED)\n to be copied in your path\n\n(if you don't have it already)\n\nJST and WHDLoad are available from aminet (game/patch)")
  24.  
  25. (set @default-dest
  26. (askdir
  27.     (prompt ("Where should %s installed ?\nA drawer \"%s\" will automatically created." @app-name @app-name))
  28.     (help @askdir-help)
  29.     (default @default-dest)
  30.     (disk)
  31. )
  32. )
  33.  
  34. (set #dest (tackon @default-dest @app-name))
  35. (set #CI_unit
  36.     (askchoice
  37.         (prompt "From which disk unit do you want\nto install the game")
  38.         (help    @askoptions-help)
  39.         (choices
  40.            "DF0:"
  41.            "DF1:"
  42.            "DF2:"
  43.            "DF3:"
  44.         )
  45.     )
  46. )
  47.  
  48. (set #CI_drive ("DF%ld:" #CI_unit))
  49.  
  50. (set #Game_Ver
  51.     (askchoice
  52.         (prompt "Which version of the loader do you wish to install")
  53.         (help    @askoptions-help)
  54.         (choices
  55.            "JST"
  56.            "WHDLoad"
  57.         )
  58.     )
  59. )
  60.  
  61. (makedir #dest
  62.     (help @makedir-help)
  63.     (infos)
  64. )
  65.  
  66. ;----------------------------
  67. (if (= #Game_Ver 0)
  68. (copyfiles
  69.   (help @copyfiles-help)
  70.   (source ("JHD.inf"))
  71.   (newname ("%sHD.info" @app-name ))
  72.   (dest #dest)
  73. ))
  74. (if (= #Game_Ver 0)
  75. (copyfiles
  76.   (help @copyfiles-help)
  77.   (source ("HD"))
  78.   (newname ("%sHD" @app-name ))
  79.   (dest #dest)
  80. ))
  81. (if (= #Game_Ver 1)
  82. (copyfiles
  83.   (help @copyfiles-help)
  84.   (source ("WHD.inf"))
  85.   (newname ("%sHD.info" @app-name ))
  86.   (dest #dest)
  87. ))
  88. (if (= #Game_Ver 1)
  89. (copyfiles
  90.   (help @copyfiles-help)
  91.   (source ("HD.slave" ))
  92.   (newname ("%sHD.slave" @app-name ))
  93.   (dest #dest)
  94. ))
  95. (copyfiles
  96.   (help @copyfiles-help)
  97.   (source ("%shd.readme" #readme))
  98.   (dest #dest)
  99.   (infos)
  100. )
  101.  
  102.  
  103. (message ("\nInsert %s into drive %s !" @app-name #CI_drive))
  104.     (if
  105.         (= 0 (run ("lastdl2file %ld \"%s/disk.1\" 1 108 >con:0/0/450/100//CLOSE/WAIT" #CI_unit #dest)))
  106.         ("")
  107.         (abort "\"lastdl2file\" must be in your PATH !")
  108.     )
  109. (exit)
  110.  
  111.